package com.yzt.dynamicmodule.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.yzt.plugin_widget.RoundImageView;
import com.yzt.dynamicmodule.R;
import com.yzt.zhuju.network.entity.dynamic.GameScriptDescMissionsBean;
import com.yzt.zhuju.widget.widget.ImageLoadManger;

/**
 * author : bob
 * date   : 2023/2/27
 * desc   : 动态的适配器
 */
public class GameScriptDescAdapter extends BaseQuickAdapter<GameScriptDescMissionsBean, BaseViewHolder> {

    public GameScriptDescAdapter() {
        super(R.layout.item_game_script_desc);
    }

    @Override
    protected void convert(BaseViewHolder holder, GameScriptDescMissionsBean item) {
        RoundImageView imgHeader = holder.findView(R.id.img_cover);
        ImageLoadManger.loadIv(getContext(), item.getVideoUrl(), imgHeader, R.mipmap.default_photo);
        holder.setText(R.id.tv_name, item.getMissionId()+"")
                .setText(R.id.tv_position, "第" + (getItemPosition(item) + 1) + "关");
    }
}